package _2_函数_运算._6_lambda;

import _0_object_oriented.User;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;

public class UserWithLambda extends User {

  public static List<User> filterApple(Iterable<User> users, Predicate<User> predicate){
    List<User> userList = new ArrayList<>();
    for (User apple : users) {
      if (predicate.test(apple)) {
        userList.add(apple);
      }
    }
    return userList;
  }
}
